﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MarketOnlineDAO;
using MarketOnlineDTO;

namespace MarketOnlineBUS
{
    public class ChiTietHoaDonBUS
    {

        public Boolean ThemChiTietHoaDon(ChiTietHoaDonDTO dto)
        {
            return new ChiTietHoaDonDAO().ThemChiTietHoaDon(dto);
        }

        public List<ChiTietHoaDonDTO> LayDanhSachChiTietHoaDon()
        {
            return new ChiTietHoaDonDAO().LayDanhSachChiTietHoaDon();
        }

        public ChiTietHoaDonDTO LayChiTietHoaDon(int MaChiTietHoaDon)
        {
            return new ChiTietHoaDonDAO().LayChiTietHoaDon(MaChiTietHoaDon); 
        }

        public Boolean CapNhatChiTietHoaDon(ChiTietHoaDonDTO dto)
        {
            return new ChiTietHoaDonDAO().CapNhatChiTietHoaDon(dto);
 
        }

        public Boolean XoaChiTietHoaDon(int MaChiTietHoaDon)
        {
            return new ChiTietHoaDonDAO().XoaChiTietHoaDon(MaChiTietHoaDon);
        }

        public Boolean XoaChiTietHoaDon_MaHD(int MaHD)
        {
            return new ChiTietHoaDonDAO().XoaChiTietHoaDon_MaHD(MaHD);
        }

//------------Quân viết thêm------------------------

        public List<ChiTietHoaDonDTO> LayCTHDTheoMaHD(ChiTietHoaDonDTO ct)
        {
            return new ChiTietHoaDonDAO().LayCTHDTheoMaHD(ct);
        }

//--------------------------------------------------
    }
}
